package com.freedo.demo.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * 图层路由
 * @author murong
 * @since jdk1.8
 *
 */
@RestController
public class LayerController {

	@RequestMapping(value="/layer/{id}",method= {RequestMethod.GET,RequestMethod.POST})
	public String getLayer(@PathVariable String id) {
		return "layer:"+id;
	}
	
	@RequestMapping(value="/layer",method= {RequestMethod.GET,RequestMethod.POST})
	public String getLayers(@RequestParam(value="id",required=false,defaultValue="2") String id) {
		return "layer:"+id;
	}
	
	
}
